package org.jeecg.modules.common.sensitive.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * @Description: 脱敏规则
 * @Author: jeecg-boot
 * @Date: 2022-06-14
 * @Version: V1.0
 */
@Data
@TableName("sensitive_rule")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "sensitive_rule对象", description = "脱敏规则")
public class SensitiveRule implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
    private String sysOrgCode;
    /**
     * 逻辑删除
     */
    @Excel(name = "逻辑删除", width = 15)
    @TableLogic
    @ApiModelProperty(value = "逻辑删除")
    private Integer delFlag;
    /**
     * 规则分类
     */
    @Excel(name = "规则分类", width = 15)
    @ApiModelProperty(value = "规则分类")
    @Dict(dicCode = "sensitive_rule_type")
    private Integer type;
    /**
     * 规则名称
     */
    @Excel(name = "规则名称", width = 15)
    @ApiModelProperty(value = "规则名称")
    private String name;
    /**
     * 敏感等级
     */
    @Excel(name = "敏感等级", width = 15)
    @ApiModelProperty(value = "敏感等级")
    @Dict(dicCode = "sensitive_rule_level")
    private String level;
    /**
     * 状态
     */
    @Excel(name = "状态", width = 15)
    @ApiModelProperty(value = "状态")
    private Integer status;
    /**
     * 来源
     */
    @Excel(name = "来源", width = 15)
    @ApiModelProperty(value = "来源")
    private String origin;
    /**
     * 描述
     */
    @Excel(name = "描述", width = 15)
    @ApiModelProperty(value = "描述")
    private String description;
    /**
     * 匹配类名
     */
    @Excel(name = "匹配类名", width = 15)
    @ApiModelProperty(value = "匹配类名")
    @Dict(dicCode = "sensitive_match_class")
    private String matchClass;
    /**
     * 匹配入参
     */
    @Excel(name = "匹配入参", width = 15)
    @ApiModelProperty(value = "匹配入参")
    private String matchParam;
    /**
     * 插件类名
     */
    @Excel(name = "插件类名", width = 15)
    @ApiModelProperty(value = "插件类名")
    @Dict(dicCode = "sensitive_plugin_class")
    private String pluginClass;
    /**
     * 插件参数
     */
    @Excel(name = "插件参数", width = 15)
    @ApiModelProperty(value = "插件参数")
    private String pluginParam;

    /**
     * 插件JSON参数
     */
    @Excel(name = "插件JSON参数", width = 15)
    @ApiModelProperty(value = "插件JSON参数")
    @TableField(exist = false)
    private Map<String, Object> pluginJsonParam;
}
